package net.lwf.xml.parser;

import java.util.HashMap;
import java.util.List;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 * General XML document in the KP J2EE framework.
 *
 */
public interface IDomDocument extends java.io.Serializable {

  /**
   * Get the parsed document.
   *
   * @return parsed document
   */
  public Document getDocument();


  /**
  * This method returns handle to the
  * root element of the given xml document.
  *
  * @return root element
  */
  public Element getRoot();


  /**
   * This method returns all the child elements of a given parent element.
   *
   * @return child elements
   */
  public List getChildElements(org.w3c.dom.Element parent)
   // throws org.kp.j2ee.xml.XMLDeclerativeException;
  throws Exception;


  /**
   * This method returns all the child elements of a the root element.
   *
   * @return child elements
   */
  public List getChildElementsOfRoot()
  //  throws org.kp.j2ee.xml.XMLDeclerativeException;
  throws Exception;

  
  public boolean hasChildren(Element element);

  /**
   * This method returns all the attributes of a given element.
   *
   * @return attributes
   */
  public HashMap getAttributes(org.w3c.dom.Element anElement)
    //throws org.kp.j2ee.xml.XMLDeclerativeException;
  throws Exception;
}

